package bx.com.smartcashier.mode;



import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

public class SmartShopOrderVO  implements Parcelable {
    /**
     * 订单Id
     */
    private Integer id;
    /**
     * 公司Id
     */

    private Integer companyId;
    /**
     * 会员手机号
     */

    private String memberPhone;

    /**
     * 状态 1 正常, -1 删除
     */
    private Integer status;
    /**
     * 备注
     */
    private String remark;
    /**
     * 收支帐号
     */
    private Integer accountNo;
    /**
     * 实际总数量(不包含退货)
     */
    private Integer count;

    /**
     * 总金额(不包含退货)
     */
    private String amount;
    /**
     * 仓库Id
     */
    private Integer warehouseId;
    /**
     * 创建人
     */
    private Integer creator;
    /**
     * 创建人名称
     */
    private String creatorName;
    /**
     * 修改时间
     */
    private String gmtModify;
    /**
     * 修改人
     */
    private Integer operator;
    /**
     * 会员名称
     */
    private String memberName;
    /**
     * 单号
     */
    private String billSn;
    /**
     * 创建时间
     */
    private String gmtCreate;
    /**
     * 分销商Id
     */
    private Integer distributorId;
    /**
     * 门店Id
     */
    private Integer shopId;
    /**
     * 类型 1 正常订单 2 挂单
     */
    private Integer type;
    /**
     * 支付类型
     */
    private Integer payType;

    private String payTypeValue;

    private String retailPriceAmount;

    private Integer firstPayType;

    private Integer secondPayType;

    private String firstPayMoney;

    private String secondPayMoney;

    private String companyName;

    private String shopName;
    /**
     * 订单明细
     */
    private List<SmartShopOrderDetailVO> smartShopOrderDetailVOS;
    /**
     * 退货数
     */
    private Integer returnCount;
    /**
     * 实收金额
     */
    private BigDecimal realSellAmount;
    /**
     * 会员数
     */
    private Integer memberCount;
    /**
     * 总销售数
     */
    private Integer totalSellCount;
    /**
     * 总销售金额
     */
    private BigDecimal totalSellAmount;
    /**
     * 总退货金额
     */
    private BigDecimal totalReturnAmount;

    private Integer shoppingGuide;

    private String shoppingGuideName;

    private BigDecimal alipayAmount;

    private BigDecimal wechatAmount;

    private BigDecimal moneyAmount;

    private BigDecimal vipAmount;

    private BigDecimal cardAmount;

    private BigDecimal unionAmount;

    protected SmartShopOrderVO(Parcel in) {
        if (in.readByte() == 0) {
            id = null;
        } else {
            id = in.readInt();
        }
        if (in.readByte() == 0) {
            companyId = null;
        } else {
            companyId = in.readInt();
        }
        memberPhone = in.readString();
        if (in.readByte() == 0) {
            status = null;
        } else {
            status = in.readInt();
        }
        remark = in.readString();
        if (in.readByte() == 0) {
            accountNo = null;
        } else {
            accountNo = in.readInt();
        }
        if (in.readByte() == 0) {
            count = null;
        } else {
            count = in.readInt();
        }
        amount = in.readString();
        if (in.readByte() == 0) {
            warehouseId = null;
        } else {
            warehouseId = in.readInt();
        }
        if (in.readByte() == 0) {
            creator = null;
        } else {
            creator = in.readInt();
        }
        creatorName = in.readString();
        gmtModify = in.readString();
        if (in.readByte() == 0) {
            operator = null;
        } else {
            operator = in.readInt();
        }
        memberName = in.readString();
        billSn = in.readString();
        gmtCreate = in.readString();
        if (in.readByte() == 0) {
            distributorId = null;
        } else {
            distributorId = in.readInt();
        }
        if (in.readByte() == 0) {
            shopId = null;
        } else {
            shopId = in.readInt();
        }
        if (in.readByte() == 0) {
            type = null;
        } else {
            type = in.readInt();
        }
        if (in.readByte() == 0) {
            payType = null;
        } else {
            payType = in.readInt();
        }
        payTypeValue = in.readString();
        retailPriceAmount = in.readString();
        if (in.readByte() == 0) {
            firstPayType = null;
        } else {
            firstPayType = in.readInt();
        }
        if (in.readByte() == 0) {
            secondPayType = null;
        } else {
            secondPayType = in.readInt();
        }
        firstPayMoney = in.readString();
        secondPayMoney = in.readString();
        companyName = in.readString();
        shopName = in.readString();
        smartShopOrderDetailVOS = in.createTypedArrayList(SmartShopOrderDetailVO.CREATOR);
        if (in.readByte() == 0) {
            returnCount = null;
        } else {
            returnCount = in.readInt();
        }
        if (in.readByte() == 0) {
            memberCount = null;
        } else {
            memberCount = in.readInt();
        }
        if (in.readByte() == 0) {
            totalSellCount = null;
        } else {
            totalSellCount = in.readInt();
        }
        if (in.readByte() == 0) {
            shoppingGuide = null;
        } else {
            shoppingGuide = in.readInt();
        }
        shoppingGuideName = in.readString();
    }

    public static final Creator<SmartShopOrderVO> CREATOR = new Creator<SmartShopOrderVO>() {
        @Override
        public SmartShopOrderVO createFromParcel(Parcel in) {
            return new SmartShopOrderVO(in);
        }

        @Override
        public SmartShopOrderVO[] newArray(int size) {
            return new SmartShopOrderVO[size];
        }
    };

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }

    public String getMemberPhone() {
        return memberPhone;
    }

    public void setMemberPhone(String memberPhone) {
        this.memberPhone = memberPhone;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getAccountNo() {
        return accountNo;
    }

    public void setAccountNo(Integer accountNo) {
        this.accountNo = accountNo;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public String getAmount() {
        return amount;
    }

    public void setAmount(String amount) {
        this.amount = amount;
    }

    public Integer getWarehouseId() {
        return warehouseId;
    }

    public void setWarehouseId(Integer warehouseId) {
        this.warehouseId = warehouseId;
    }

    public Integer getCreator() {
        return creator;
    }

    public void setCreator(Integer creator) {
        this.creator = creator;
    }

    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    public String getGmtModify() {
        return gmtModify;
    }

    public void setGmtModify(String gmtModify) {
        this.gmtModify = gmtModify;
    }

    public Integer getOperator() {
        return operator;
    }

    public void setOperator(Integer operator) {
        this.operator = operator;
    }

    public String getMemberName() {
        return memberName;
    }

    public void setMemberName(String memberName) {
        this.memberName = memberName;
    }

    public String getBillSn() {
        return billSn;
    }

    public void setBillSn(String billSn) {
        this.billSn = billSn;
    }

    public String getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(String gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Integer getDistributorId() {
        return distributorId;
    }

    public void setDistributorId(Integer distributorId) {
        this.distributorId = distributorId;
    }

    public Integer getShopId() {
        return shopId;
    }

    public void setShopId(Integer shopId) {
        this.shopId = shopId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    public String getPayTypeValue() {
        return payTypeValue;
    }

    public void setPayTypeValue(String payTypeValue) {
        this.payTypeValue = payTypeValue;
    }

    public String getRetailPriceAmount() {
        return retailPriceAmount;
    }

    public void setRetailPriceAmount(String retailPriceAmount) {
        this.retailPriceAmount = retailPriceAmount;
    }

    public Integer getFirstPayType() {
        return firstPayType;
    }

    public void setFirstPayType(Integer firstPayType) {
        this.firstPayType = firstPayType;
    }

    public Integer getSecondPayType() {
        return secondPayType;
    }

    public void setSecondPayType(Integer secondPayType) {
        this.secondPayType = secondPayType;
    }

    public String getFirstPayMoney() {
        return firstPayMoney;
    }

    public void setFirstPayMoney(String firstPayMoney) {
        this.firstPayMoney = firstPayMoney;
    }

    public String getSecondPayMoney() {
        return secondPayMoney;
    }

    public void setSecondPayMoney(String secondPayMoney) {
        this.secondPayMoney = secondPayMoney;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public List<SmartShopOrderDetailVO> getSmartShopOrderDetailVOS() {
        return smartShopOrderDetailVOS;
    }

    public void setSmartShopOrderDetailVOS(List<SmartShopOrderDetailVO> smartShopOrderDetailVOS) {
        this.smartShopOrderDetailVOS = smartShopOrderDetailVOS;
    }

    public Integer getReturnCount() {
        return returnCount;
    }

    public void setReturnCount(Integer returnCount) {
        this.returnCount = returnCount;
    }

    public BigDecimal getRealSellAmount() {
        return realSellAmount;
    }

    public void setRealSellAmount(BigDecimal realSellAmount) {
        this.realSellAmount = realSellAmount;
    }

    public Integer getMemberCount() {
        return memberCount;
    }

    public void setMemberCount(Integer memberCount) {
        this.memberCount = memberCount;
    }

    public Integer getTotalSellCount() {
        return totalSellCount;
    }

    public void setTotalSellCount(Integer totalSellCount) {
        this.totalSellCount = totalSellCount;
    }

    public BigDecimal getTotalSellAmount() {
        return totalSellAmount;
    }

    public void setTotalSellAmount(BigDecimal totalSellAmount) {
        this.totalSellAmount = totalSellAmount;
    }

    public BigDecimal getTotalReturnAmount() {
        return totalReturnAmount;
    }

    public void setTotalReturnAmount(BigDecimal totalReturnAmount) {
        this.totalReturnAmount = totalReturnAmount;
    }

    public Integer getShoppingGuide() {
        return shoppingGuide;
    }

    public void setShoppingGuide(Integer shoppingGuide) {
        this.shoppingGuide = shoppingGuide;
    }

    public String getShoppingGuideName() {
        return shoppingGuideName;
    }

    public void setShoppingGuideName(String shoppingGuideName) {
        this.shoppingGuideName = shoppingGuideName;
    }

    public BigDecimal getAlipayAmount() {
        return alipayAmount;
    }

    public void setAlipayAmount(BigDecimal alipayAmount) {
        this.alipayAmount = alipayAmount;
    }

    public BigDecimal getWechatAmount() {
        return wechatAmount;
    }

    public void setWechatAmount(BigDecimal wechatAmount) {
        this.wechatAmount = wechatAmount;
    }

    public BigDecimal getMoneyAmount() {
        return moneyAmount;
    }

    public void setMoneyAmount(BigDecimal moneyAmount) {
        this.moneyAmount = moneyAmount;
    }

    public BigDecimal getVipAmount() {
        return vipAmount;
    }

    public void setVipAmount(BigDecimal vipAmount) {
        this.vipAmount = vipAmount;
    }

    public BigDecimal getCardAmount() {
        return cardAmount;
    }

    public void setCardAmount(BigDecimal cardAmount) {
        this.cardAmount = cardAmount;
    }

    public BigDecimal getUnionAmount() {
        return unionAmount;
    }

    public void setUnionAmount(BigDecimal unionAmount) {
        this.unionAmount = unionAmount;
    }


    public SmartShopOrderVO() {
    }

    public SmartShopOrderVO(Integer id, Integer companyId, String memberPhone, Integer status, String remark, Integer accountNo, Integer count, String amount, Integer warehouseId, Integer creator, String creatorName, String gmtModify, Integer operator, String memberName, String billSn, String gmtCreate, Integer distributorId, Integer shopId, Integer type, Integer payType, String payTypeValue, String retailPriceAmount, Integer firstPayType, Integer secondPayType, String firstPayMoney, String secondPayMoney, String companyName, String shopName, List<SmartShopOrderDetailVO> smartShopOrderDetailVOS, Integer returnCount, BigDecimal realSellAmount, Integer memberCount, Integer totalSellCount, BigDecimal totalSellAmount, BigDecimal totalReturnAmount, Integer shoppingGuide, String shoppingGuideName, BigDecimal alipayAmount, BigDecimal wechatAmount, BigDecimal moneyAmount, BigDecimal vipAmount, BigDecimal cardAmount, BigDecimal unionAmount) {
        this.id = id;
        this.companyId = companyId;
        this.memberPhone = memberPhone;
        this.status = status;
        this.remark = remark;
        this.accountNo = accountNo;
        this.count = count;
        this.amount = amount;
        this.warehouseId = warehouseId;
        this.creator = creator;
        this.creatorName = creatorName;
        this.gmtModify = gmtModify;
        this.operator = operator;
        this.memberName = memberName;
        this.billSn = billSn;
        this.gmtCreate = gmtCreate;
        this.distributorId = distributorId;
        this.shopId = shopId;
        this.type = type;
        this.payType = payType;
        this.payTypeValue = payTypeValue;
        this.retailPriceAmount = retailPriceAmount;
        this.firstPayType = firstPayType;
        this.secondPayType = secondPayType;
        this.firstPayMoney = firstPayMoney;
        this.secondPayMoney = secondPayMoney;
        this.companyName = companyName;
        this.shopName = shopName;
        this.smartShopOrderDetailVOS = smartShopOrderDetailVOS;
        this.returnCount = returnCount;
        this.realSellAmount = realSellAmount;
        this.memberCount = memberCount;
        this.totalSellCount = totalSellCount;
        this.totalSellAmount = totalSellAmount;
        this.totalReturnAmount = totalReturnAmount;
        this.shoppingGuide = shoppingGuide;
        this.shoppingGuideName = shoppingGuideName;
        this.alipayAmount = alipayAmount;
        this.wechatAmount = wechatAmount;
        this.moneyAmount = moneyAmount;
        this.vipAmount = vipAmount;
        this.cardAmount = cardAmount;
        this.unionAmount = unionAmount;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        if (id == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(id);
        }
        if (companyId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(companyId);
        }
        dest.writeString(memberPhone);
        if (status == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(status);
        }
        dest.writeString(remark);
        if (accountNo == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(accountNo);
        }
        if (count == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(count);
        }
        dest.writeString(amount);
        if (warehouseId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(warehouseId);
        }
        if (creator == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(creator);
        }
        dest.writeString(creatorName);
        dest.writeString(gmtModify);
        if (operator == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(operator);
        }
        dest.writeString(memberName);
        dest.writeString(billSn);
        dest.writeString(gmtCreate);
        if (distributorId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(distributorId);
        }
        if (shopId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(shopId);
        }
        if (type == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(type);
        }
        if (payType == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(payType);
        }
        dest.writeString(payTypeValue);
        dest.writeString(retailPriceAmount);
        if (firstPayType == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(firstPayType);
        }
        if (secondPayType == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(secondPayType);
        }
        dest.writeString(firstPayMoney);
        dest.writeString(secondPayMoney);
        dest.writeString(companyName);
        dest.writeString(shopName);
        dest.writeTypedList(smartShopOrderDetailVOS);
        if (returnCount == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(returnCount);
        }
        if (memberCount == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(memberCount);
        }
        if (totalSellCount == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(totalSellCount);
        }
        if (shoppingGuide == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(shoppingGuide);
        }
        dest.writeString(shoppingGuideName);
    }

    public static Creator<SmartShopOrderVO> getCREATOR() {
        return CREATOR;
    }
}
